<?php


namespace app\admin\model;


use think\Model;

class Role extends Model
{
    //字段信息
    protected $schema = [
        'id'=>'int',
        'title'=>'string',
        'status'=>'int',
        'details'=>'string',
        'create_time'=>'int'
    ];

    public function permissions()
    {
        return $this->belongsToMany(Permission::class, RolePermission::class);
    }

}